Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply annotations to default location #3696

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

alexkursell
Copy link
Contributor

What this PR does / why we need it:

Right now, support for ingresses like the following is broken:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    nginx.ingress.kubernetes.io/proxy-buffer-size: "8k"
spec:
  backend:
    serviceName: echo-service
    servicePort: 8080
  rules:
  - host: example.com

While it will route requests for example.com to the service, none of the annotations are applied. This is in contrast to the behaviour of

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example-ingress2
  annotations:
    nginx.ingress.kubernetes.io/proxy-buffer-size: "8k"
spec:
  rules:
  - host: example.com
    http:
      paths:
        - path: /
          backend:
            serviceName: echo-service
            servicePort: 8080

where the annotations are applied. If we are going to support ingress definitions like the first one here, we should support annotations for them as well.

Which issue this PR fixes
fixes #3520

Special notes for your reviewer:

This PR reverses #1233. I don't have any context as to why that change was made, so if the reasons why are still relevant it would be good to discuss.

cc: @ElvinEfendi , @aledbf

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 24, 2019
@alexkursell alexkursell changed the title Annotate default location Apply annotations to default location Jan 24, 2019
@ElvinEfendi
Copy link
Member

@alexkursell please write an e2e test showing the issue.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 25, 2019
@aledbf aledbf added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Jan 25, 2019
@ElvinEfendi
Copy link
Member

test/e2e/defaultbackend/default_backend_annotations.go

I think this should rather be test/e2e/defaultbackend/with_hosts.go. It's about supporting scenario when default backend is being used for give hosts. And making annotations work properly is only one part of it.

@ElvinEfendi
Copy link
Member

After this PR we should DRY this code path - having annotation assignment being duplicated in multiple place is error prone and hard to maintain.

@ElvinEfendi
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexkursell, ElvinEfendi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2019
@aledbf aledbf removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Feb 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit eab7f18 into kubernetes:master Feb 12, 2019
@ElvinEfendi ElvinEfendi deleted the annotate-default-location branch February 14, 2019 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature request: support canonical ingress manifests
4 participants